<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->

<th class="data-grid-multicheck-cell">
    <div
        class="action-multicheck-wrap"
        data-bind="css: {'_disabled': !totalRecords()},
                   collapsible">
        <input
            id="mass-select-checkbox"
            class="admin__control-checkbox"
            type="checkbox"
            data-bind="checked: allSelected(),
                       event: { change: toggleSelectAll },
                       css: { '_indeterminate': indetermine },
                       enable: totalRecords">
        <label for="mass-select-checkbox"></label>
        <button
            class="action-multicheck-toggle"
            data-toggle="dropdown"
            data-bind="css: { '_active': $collapsible.opened },
                       enable: totalRecords,
                       toggleCollapsible">
            <span data-bind="i18n: 'Options'"></span>
        </button>
        <ul
            class="action-menu"
            data-bind="closeCollapsible, foreach: actions">
            <li data-bind="click: $parent[value].bind($parent),
                           visible: $parent.isActionRelevant(value)">
                <span class="action-menu-item" data-bind="text: label"></span>
            </li>
        </ul>
    </div>
</th>
